        <?php
            $active_link = "Home";
            $class_active = "class='active'";
            if (isset($page_type)) {
                switch ($page_type) {
                    case 'Home':
                        $active_link = "Home";
                        break;
                    case 'Started':
                        $active_link = 'Started';
                        break;
                    case 'Chapters':
                        break;
                    default:
                        $active_link = "Home";
                        break;
                }
            } else {
                $active_link = "Home";
            }
            for ($i = 0; $i < count ($CategoryList); $i ++) {
                if (isset($page_type_url) && $CategoryList[$i]->url == $page_type_url) {
                    $active_link = $this->uri->segment(3);
                }   
            }
        ?>     
        
        <div id="menu">
            <ul>
                <li> <a href="<?php echo base_url(); ?>Home" <?php if ($active_link == 'Home') echo $class_active;  ?>> Trang chủ </a> </li>
                <li> <a href="<?php echo base_url(); ?>Started" <?php if ($active_link == 'Started') echo $class_active;  ?>> Bắt đầu </a> </li>
                <li> <a href="#" <?php if ($active_link == 'Download') echo $class_active;  ?>> Downloads </a> </li>
                <?php
                    for ($i = 0; $i < count ($CategoryList); $i ++) {
                ?>
                <li> <a href="<?php echo base_url(); ?>Chapters/Review/<?php echo $CategoryList[$i]->url; ?>" title='Bài học về <?php echo $CategoryList[$i]->CategoryName; ?>' <?php if ($active_link == $CategoryList[$i]->url) echo $class_active;  ?>> <?php echo $CategoryList[$i]->CategoryName; ?> </a> </li>
                <?php
                    }
                ?>  
                <li> <a href="#" <?php if ($active_link == 'Solution') echo $class_active;  ?>> Solutions </a> </li>
                <li> <a href="#" <?php if ($active_link == 'Community') echo $class_active;  ?>> Community </a> </li>
                <li> <a href="#" <?php if ($active_link == 'Support') echo $class_active;  ?>> Support </a> </li>
            </ul>
              <div class="clear"></div>
        </div>